package com.uinnova.springboot.initdata;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * springboot启动时执行任务CommandLineRunner，model实现commandLineRunner接口并重写run方法
 */
@Component
public class MyCommandLine implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        System.out.println("可以注入service，进行数据的初始化");
    }
}
